package com.iwop.moto.utils.alipay;

import com.alipay.api.domain.AlipayTradeAppPayModel;
import com.iwop.moto.utils.stringUtil.DateFormatter;

import java.util.Date;

/**
 * @功能: 支付宝APP支付请求体
 * @日期: liuwb by 2016-11-4 11:28:08 create
 */
public class AlipayTradeAppPay {

    /** 支付宝分配给开发者的应用ID  **/
    private String app_id;

    /** 接口名称 **/
    private String method;

    /** 仅支持JSON **/
    private String format;

    /** 请求使用的编码格式，如utf-8,gbk,gb2312等 **/
    private String charset;

    /** 商户生成签名字符串所使用的签名算法类型，目前支持RSA **/
    private String sign_type;

    /** 商户请求参数的签名串，详见签名 **/
    private String sign;

    /** 发送请求的时间，格式"yyyy-MM-dd HH:mm:ss" **/
    private String timestamp;

    /** 调用的接口版本，固定为：1.0 **/
    private String version;

    /** 支付宝服务器主动通知商户服务器里指定的页面http/https路径。建议商户使用https **/
    private String notify_url;

    /** 业务请求参数的集合，最大长度不限，除公共参数外所有请求参数都必须放在这个参数中传递，具体参照各产品快速接入文档 **/
    private AlipayTradeAppPayModel biz_content;

    public AlipayTradeAppPay(){
        app_id = AliPayComm.APP_ID;
        method = AliPayComm.ALIPAY_TRADE_APP_MOTHOD;
        charset = AliPayComm.CHARSET;
        sign_type = AliPayComm.SIGN_TYPE;
        version = AliPayComm.ALIPAY_VERSION;
        timestamp = DateFormatter.simpleDateTimeFormat(new Date());
    }

    public String getApp_id() {
        return app_id;
    }

    public void setApp_id(String app_id) {
        this.app_id = app_id;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public String getCharset() {
        return charset;
    }

    public void setCharset(String charset) {
        this.charset = charset;
    }

    public String getSign_type() {
        return sign_type;
    }

    public void setSign_type(String sign_type) {
        this.sign_type = sign_type;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getNotify_url() {
        return notify_url;
    }

    public void setNotify_url(String notify_url) {
        this.notify_url = notify_url;
    }

    public AlipayTradeAppPayModel getBiz_content() {
        return biz_content;
    }

    public void setBiz_content(AlipayTradeAppPayModel biz_content) {
        this.biz_content = biz_content;
    }
}
